(function() {
    function af() {
        var video = document.querySelector('video');
        if (video != null) {
           var channels =  document.querySelectorAll('.channel  ')||document.querySelectorAll('li[data-live]');
            if (channels && channels.length > 0) {
                // 遍历查找包含"湖南经视"的元素
                for (var i = 0; i < channels.length; i++) {
                    if (channels[i].textContent && channels[i].textContent.includes('{}')) {
                        channels[i].click(); // 点击找到的元素
                        break; // 找到后退出循环
                    }
                }
            }

           setTimeout(function() {
              // 将视频元素移动到body下
              video = document.querySelector('video');
              document.body.appendChild(video);
              video.volume = 1;
              // 设置视频全屏样式
              video.style.position = 'fixed';
              video.style.top = '0px';
              video.style.left = '0px';
              video.style.zIndex = '9999';
              video.style.objectFit = 'cover';
              video.style.backgroundColor = 'black';
              video.style.margin = '0';
              video.style.padding = '0';
              video.style.border = 'none';
          }, 2000);
        } else {
            setTimeout(function() { af(); }, 200);
        }
    }
    af();
})();
